/**
 * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved.
 */
package com.jeeplus.modules.web.service;

import java.util.List;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.jeeplus.core.persistence.Page;
import com.jeeplus.core.service.CrudService;
import com.jeeplus.modules.web.entity.WxAgentsEquipment;
import com.jeeplus.modules.web.mapper.WxAgentsEquipmentMapper;

/**
 * 代理商绑定设备Service
 * @author rongjie
 * @version 2017-08-06
 */
@Service
@Transactional(readOnly = true)
public class WxAgentsEquipmentService extends CrudService<WxAgentsEquipmentMapper, WxAgentsEquipment> {

	public WxAgentsEquipment get(String id) {
		return super.get(id);
	}

	public List<WxAgentsEquipment> findList(WxAgentsEquipment wxAgentsEquipment) {
		return super.findList(wxAgentsEquipment);
	}

	public Page<WxAgentsEquipment> findPage(Page<WxAgentsEquipment> page, WxAgentsEquipment wxAgentsEquipment) {
		return super.findPage(page, wxAgentsEquipment);
	}


	@Transactional(readOnly = false)
	public void batchAddAgentsEquipment(List<WxAgentsEquipment> wxAgentsEquipmentList) {
		mapper.batchAddAgentsEquipment(wxAgentsEquipmentList);
	}

	@Transactional(readOnly = false)
	public void save(WxAgentsEquipment wxAgentsEquipment) {
		super.save(wxAgentsEquipment);
	}

	@Transactional(readOnly = false)
	public void delete(WxAgentsEquipment wxAgentsEquipment) {
		super.delete(wxAgentsEquipment);
	}
	
	public List<WxAgentsEquipment> getAgentEquipments(int agentID){
		return mapper.getEquipmentsByAgentID(agentID);
	}

}